<%@ page import="com.cinsea.security.util.JdbcUtil" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ include file="/common/common.jsp" %>
<%
    String currUser = Env.getRemoteUser().getCurrentuserid();//当前用户的ID
    String day=StringUtil.null2String(request.getParameter("day"));
    int pageSize=20;
%>
<html>
<head>
    <%@ include file="/common/head.jsp" %>
    <title>未联系客户</title>
</head>
<body>
</body>
</html>
<script type="text/javascript">

    Ext.onReady(function(){
        store = new Ext.data.JsonStore({
            url:'/ext/com.cinsea.crm.ext.CrmAction?action=noContact&day='+<%=day%>,
            root:'result',
            totalProperty:'totalCount',
            fields:['name','crmtype','managerid','sjjd','lxdate','xclxrq'],
            remoteSort:true
        });

        var sm = new Ext.grid.CheckboxSelectionModel();
        var cm = new Ext.grid.ColumnModel([
            {header:'客户名称',dataIndex:'name',width:85,sortable:true},
            {header:'客户类别',dataIndex:'crmtype',width:85,sortable:true},
            {header:'客户经理',dataIndex:'managerid',width:85,sortable:true},
            {header:'商机阶段',dataIndex:'sjjd',width:85,sortable:true},
            {header:'上次联系日期',dataIndex:'lxdate',width:85,sortable:true},
            {header:'下次联系日期',dataIndex:'xclxrq',width:85,sortable:true}
//            {header:'联系记录',dataIndex:'content',width:85,sortable:true}
        ]);
        cm.defaultSortable = true;
        var grid = new Ext.grid.GridPanel({
            title:'客户信息：',
            region:'center',
            store:store,
            trackMouseOver:false,
            cm:cm,
            sm:sm,
            split:true,
            collapsible:true,
            collapseMode:'mini',
            viewConfig:{
                forceFit:true,
                enableRowBody:true,
                sortAscText:'升序',
                sortDescText:'降序',
                columnsText:'列定义'
            },
            bbar:new Ext.PagingToolbar({
                pageSize: 20,
                store:store,
                displayInfo:false,
                beforePageText:'第',
                afterPageText:'页\/{0}',
                firstText:'第一页',
                prevText:'上页',
                nextText:'下页',
                lastText:'最后页',
                displayMsg:'显示 {0} - {1}条记录 \/ {2}',
                emptyMsg:'没有结果返回'
            })
        });
        store.load({params:{start:0, limit:<%=pageSize%>}});
        var viewport = new Ext.Viewport({
            layout: 'border',
            items: [
                grid
            ]
        });
    });
</script>